/*****************************************************************************/
/**
 *  @file   RendererPaintEvent.h
 *  @author Jun Nishimura, Naohisa Sakamoto
 */
/*----------------------------------------------------------------------------
 *
 *  Copyright (c) Visualization Laboratory, Kyoto University.
 *  All rights reserved.
 *  See http://www.viz.media.kyoto-u.ac.jp/kvs/copyright/ for details.
 *
 *  $Id$
 */
/*****************************************************************************/
#ifndef KVSTILEDDISPLAYVIS__TDW__RENDERER_PAINT_EVENT_H_INCLUDE
#define KVSTILEDDISPLAYVIS__TDW__RENDERER_PAINT_EVENT_H_INCLUDE

#include <kvs/PaintEventListener>
#include <kvs/EventListener>
#include <kvs/Message>
#include <kvs/Mutex>
#include <list>

#include "MessageConverter.h"
#include "RendererReceiver.h"

namespace kvstileddisplayvis
{

namespace tdw
{

class RendererPaintEvent : public kvs::PaintEventListener
{
    kvsClassName( tdw::RendererPaintEvent );

protected:

    std::list<kvs::EventListener*>  m_listeners;

    kvs::Mutex                      m_mutex;
    std::list<kvs::MessageBlock>    m_messages;

    tdw::RendererReceiver*     m_receiver;

public:

    RendererPaintEvent( void );

    virtual ~RendererPaintEvent( void );

public:

    void initialize( void );

    void attach( kvs::EventListener* listener );

    void clearMessage( void );

public:

    void update( void );

};

}

}

#endif
